using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;
using System.IO;

namespace SAInterfaceLibrary.MSVCVersions
{
    /// <summary>
    /// Info to support MSVC.NET 2003 with service pack 1 (7.1)
    /// </summary>
    class MSVC2003 : ConfigMSVCVersionInfo
    {
        public MSVC2003(string template_dir)
        {
            _name = "2003";
            _template_dir = template_dir + @"\2003";
        }

        /// <summary>
        /// Return true if we can find the 2005 unique registry entries
        /// </summary>
        override public bool IsOnMachine
        {
            get
            {
                return GetRawInstallDir() != null;
            }
        }

        protected override string IDERegKey
        {
            get
            {
                return @"SOFTWARE\Microsoft\VisualStudio\7.1";
            }
        }

        /// <summary>
        /// For whatever reason, the binary file called "datafile" causes all sorts of
        /// mess in VS2003.
        /// </summary>
        /// <param name="finfo"></param>
        public override bool FileIsGood(FileInfo finfo)
        {
            return finfo.Name != "datafile";
        }
    }
}
